home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / CDTools / S / NewsFlash.awebrx < prev    next >
Text File  |  2000-12-02  |  780b  |  33 lines

  1. /*
  2.     $VER: NewsFlash.awebrx 1.1 (2.12.2000) (c) Neil Bothwick, Wirenet
  3.     Loads the NewsFlash page into AWeb then resets the environment variables
  4.  
  5.     1.1  - Uses "parse source" to get the name of the CD
  6. */
  7.  
  8. parse source . ' ' . ' ' . ' ' ScriptName ' ' .
  9. CDName = left(ScriptName, pos(':', ScriptName) - 1)
  10.  
  11. /* Exit if no newsflash */
  12. if ~exists(CDName':html/NewsFlash.html') then do
  13.     call delete('ENVARC:AACDNewsFlash')
  14.     exit
  15.     end
  16.  
  17. /* Wait for AWeb to load Welcome page */
  18. options results
  19. address command
  20. do i = 1 to 15
  21.     CDName':System/Rexxc/WaitForPort AWEB.1'
  22.     if RC = 0 then leave
  23.     end
  24. if RC > 0 then exit
  25.  
  26. address 'AWEB.1'
  27. 'WAIT ALL'
  28. 'OPEN URL "file://localhost/'CDName':html/NewsFlash.html" TARGET "main"'
  29.  
  30. /* Remove environment variable */
  31. call delete('ENVARC:AACDNewsFlash')
  32.  
  33.